package cn.innosmart.aq.camera.models;

import android.app.Fragment;
import android.graphics.Bitmap;

import cn.innosmart.aq.camera.protocol.CommandCompletionHandler;

/**
 * Created by sabonis on 4/23/15.
 * With Clean Code in mind
 */
public interface Camera {

    String DEVICE_TYPE = "Camera";

    Fragment getView();

    Bitmap getSnapShot();

    void record(int sec, String path, RecordingCallback lis);

    void listen();

    void speak();

    void mute();

    void setOnStreamInfoUpdate(OnStreamInfoUpdate lis);

    void reconnect();

    void setPassword(String password);

    void getVideoQuality(CommandCompletionHandler<Integer> cb);

    void setVideoQuality(int videoQuality);

    void getVideoMode(CommandCompletionHandler<Integer> cb);

    void setVideoMode(int mode);

    interface OnStreamInfoUpdate {
        void onFrameRateUpdate(String frameRate);

        void onFrameResolutionUpdate(String resolution);

        void onCameraConnected();

        void onCameraStatus(String did, int status);
    }

    interface RecordingCallback {
        void onRecordStart();

        void onRecordFinished();
    }

}
